﻿using System;
using UnityEngine;

// Token: 0x02000135 RID: 309
[RequireComponent(typeof(Camera))]
public class CameraSync : MonoBehaviour
{
	// Token: 0x060006FA RID: 1786 RVA: 0x00029374 File Offset: 0x00027574
	private void Awake()
	{
		this.camera = base.GetComponent<Camera>();
	}

	// Token: 0x060006FB RID: 1787 RVA: 0x00029384 File Offset: 0x00027584
	private void OnPreRender()
	{
		if (this.owner == null)
		{
			return;
		}
		this.camera.depthTextureMode = this.owner.depthTextureMode;
		this.camera.fieldOfView = this.owner.fieldOfView;
		this.camera.nearClipPlane = this.owner.nearClipPlane;
		this.camera.farClipPlane = this.owner.farClipPlane;
	}

	// Token: 0x040006EA RID: 1770
	private Camera camera;

	// Token: 0x040006EB RID: 1771
	public Camera owner;
}
